package com.shop.config.rabbitmq;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/test")
public class test {

    @Autowired
    private MessageProducer messageProducer  ;

    @RequestMapping("/rabbit")
    public void sendMessage() {
        for (int i = 0; i < 100; i++) {
            messageProducer.sendMessage("哈哈：  " +i);
        }
    }

}
